//
//  ListNode.cpp
//  cpp
//
//  Created by xueshan1 on 2019/9/3.
//  Copyright © 2019 xueshan1. All rights reserved.
//

#include <stdio.h>
#include <vector>
#include <queue>


using namespace std;
using std :: vector;

struct ListNode {
    int value;
    struct ListNode *next;
};

#pragma mark - 给出一个链表，并将链表的值以倒序存储到数组中。

void reverseListNode(ListNode *head){
    if (head == NULL) {
        return;
    }
    
    vector<int>vec;
    while (head) {
        vec.push_back(head->value);
        head = head->next;
    }
    
    reverse(vec.begin(), vec.end());
    
    }
